package com.etc.demo1.demo.service.impl;

import com.etc.demo1.demo.domain.User;
import com.etc.demo1.demo.mapper.UserMapper;
import com.etc.demo1.demo.service.UserService;

import java.util.List;

public class UserServiceImpl implements UserService {

    private UserMapper userMapper;

    @Override
    public List<User> findAll() {
        return userMapper.findAll();
    }

    @Override
    public int save(User user) {
        return userMapper.saveUser(user);
    }

    @Override
    public Integer delete(int id) {
        return userMapper.delete(id);
    }

    @Override
    public User getUserById(int id) {
        return userMapper.getUserById(id);
    }

    @Override
    public int update(User user) {
        return userMapper.Update1(user);
    }
}
